#include<iostream>
using namespace std;
const int N = 2e5 + 10;
typedef long long LL;
int tree[N];
int n;
int arr[N];
int ans[N];
int lowbit(int x)
{
	return x & -x;
}
void add(int x ,int v)
{
	for (int i = x; i < N; i += lowbit(i)) {
		tree[i] += v;
	}
}
LL query(int x)
{
	LL ans = 0;
	for (int i = x; i; i -= lowbit(i)) {
		ans += tree[i];
	}
	return ans;
}
int main()
{
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
	}
	for (int i = n; i >= 1; i--) {
		ans[i] = 1 + query(n) - query(arr[i]);
		add(arr[i], 1);
	}
	for (int i = 1; i <= n; i++) {
		cout << ans[i] << " ";
	}
	cout << endl;
	return 0;
}